<?php

class CartMod extends ModBase
{

	public function __construct()
	{
		$this->mysql = n_api('mysql')->cname('weixin');
		$this->api = n_api('article');
		$this->weixin = n_api('weixin');
	}

	public function menu($current){
		$cate = $this->weixin->getCategories();
		//$categories = $this->weixin->getCategories();

		foreach($cate as $key=>$val){
			$rs['cateTree'][$val['first_category']][] = $val;
			$rs['index'][$val['norder']][$val['first_category']] = 0;
		}
		ksort($rs['index']);
		$rs['current'] = $current;
		$this->_html("menu",$rs);
	}
	public function __destruct(){
	}
}